package com.fendaren.controller;

import com.fendaren.enums.PayMethod;
import com.fendaren.pojo.bo.SubmitOrderBO;
import com.fendaren.utils.JSONResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("orders")
public class OrderController {

    public JSONResult create(@RequestBody SubmitOrderBO submitOrderBO) {
        if (submitOrderBO.getPayMethod() != PayMethod.WEIXIN.type || submitOrderBO.getPayMethod() != PayMethod.ALIPAY.type) {
            return JSONResult.errorMsg("支付方式不支持");
        }
        return JSONResult.ok();
    }
}
